package com.ftw.commons.bean

import com.google.gson.annotations.Expose
import java.io.Serializable


class Response<T> {
    var data: T? = null
    var code: String = ""
    var message: String? = null
}


class ApiException(val code: String, val msg: String) : RuntimeException(msg)


/**
 * 分页响应数据实体
 */
data class PagingResponse<T>(
    var endRow: Int = 0,
    var pageNum: Int = 0,
    var pageSize: Int = 0,
    var pages: Int = 0,
    var startRow: Int = 0,
    var total: Int = 0,
    var hasNextPage: Boolean = true,
    var data: ArrayList<T>
)

data class PageBaseRequestVo(
    @Expose
    var pageNum: Int,
    @Expose
    var pageSize: Int
)